<template>
	<view class="content">
		<button @click="show">唤起时间选择器</button>
		<dateTimeRangePicker ref="dateTimeRangePickerRef" v-model="state.time" :invalidTime="state.invalidTime"></dateTimeRangePicker>
	</view>
</template>

<script setup>
import { reactive, ref } from 'vue';
const state = reactive({
	time: [],//[开始时间，结束时间] 例如：['2024/05/28 15:33','2024/05/28 15:43']
	invalidTime: [['2024/05/28 15:33','2024/05/29 15:43']],//不可选的时间段
})
	const dateTimeRangePickerRef = ref()
	const show = () => {
		dateTimeRangePickerRef.value.open()
	}
</script>

<style>
	.content {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
	}

	.logo {
		height: 200rpx;
		width: 200rpx;
		margin-top: 200rpx;
		margin-left: auto;
		margin-right: auto;
		margin-bottom: 50rpx;
	}

	.text-area {
		display: flex;
		justify-content: center;
	}

	.title {
		font-size: 36rpx;
		color: #8f8f94;
	}
</style>
